package com.haixiaoke.flat.house.controller;

import cn.hutool.core.util.ObjectUtil;
import com.haixiaoke.auth.AuthCheck;
import com.haixiaoke.saas.common.annotation.Log;
import com.haixiaoke.saas.common.annotation.TenantScope;
import com.haixiaoke.saas.common.core.domain.AjaxResult;
import com.haixiaoke.saas.common.core.page.TableDataInfo;
import com.haixiaoke.saas.common.enums.BusinessType;
import com.haixiaoke.saas.common.tenant.TenantContext;
import com.haixiaoke.saas.common.utils.poi.ExcelUtil;
import com.haixiaoke.saas.house.domain.CleaningProcess;
import com.haixiaoke.saas.house.domain.CleaningProcessTree;
import com.haixiaoke.saas.house.service.ICleaningProcessService;
import com.haixiaoke.saas.system.BaseController;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.List;

/**
 * 保洁流程Controller
 *
 * @author panda
 * @date 2024-05-09
 */
@RestController
@RequestMapping("/front/flat/house/cleaningProcess")
public class FlatCleaningProcessController extends BaseController {
    @Autowired
    private ICleaningProcessService cleaningProcessService;

    /**
     * 根据房屋id查询保洁流程列表
     */
    @GetMapping("/tree")
    @AuthCheck
    public AjaxResult tree(CleaningProcess cleaningProcess) {
        List<CleaningProcessTree> list = cleaningProcessService.selectCleaningProcessTree(cleaningProcess);
        return success(list);
    }

}
